
<h1>Edit profile:  <%= (@person.username||session[:username]) %></h1>
<% form_for :person, @person, :url=>{:action=>"save"} do | f |%>
<table>
  <%= f.hidden_field :id %>  
  <% if @person.username and not @person.username.blank? %>
    <%= f.hidden_field :username %>
  <% else %>
    <%= hidden_field_tag "person[username]", session[:username] %>
  <% end %>
  <tr><td>First name:</td><td> <%= f.text_field :first_name %></td></tr>
  <tr><td>Middle name:</td><td><%= f.text_field :middle_name %></td></tr>
  <tr><td>Last name:</td><td><%= f.text_field :last_name %></td></tr>
  <tr><td>Email:</td><td> <%= f.text_field :email %></td></tr>
  <tr><td>Organization:</td><td> <%= f.text_field :organization %></td></tr>
  <tr><td>Title:</td><td> <%= f.text_field :title %></td></tr>
  <tr><td colspan="2"><%= submit_tag "Save" %></td></tr>
</table>
<% end %>
  
